package com.qing.design.patterns.visitor.example.user.impl;

import com.qing.design.patterns.visitor.example.user.User;
import com.qing.design.patterns.visitor.example.visitor.Visitor;

import java.math.BigDecimal;
import java.util.Map;

public class Teacher extends User {


    public Teacher(String name, String identity, String clazz) {
        super(name, identity, clazz);
    }

    @Override
    public void accept(Visitor visitor) {
        visitor.visit(this);
    }

    //升本率
    public double entranceRatio(){
        return BigDecimal.valueOf(Math.random()*100).setScale(2,BigDecimal.ROUND_HALF_UP).doubleValue();
    }
}
